﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace PrintScreens
{
    public partial class ParentalConsentForm : UserControl
    {
        public ParentalConsentForm(Service.Printing.PrintingServiceParentalConsentForm PCF)
        {
            InitializeComponent();
            this.DataContext = PCF;

            txtName.Text = PCF.Name;
            txtDoctorName.Text = PCF.DoctorName;
            txtDoctorTelephone.Text = PCF.DoctorPhone;
            txtCanCannotSwim.Text = (PCF.CanSwim) ? "can" : "can not";
            txtMedical.Text = PCF.Medical;

            AddBullet("I have had the activities of the club explained and agree to my child taking part in these activities.");
            AddBullet("I confirm to the best of my knowledge that my child does not suffer from any medical condition other than those listed above.");
            AddBullet("I consent to my child receiving medical treatment, which, in the opinion of a qualified medical practitioner, may be necessary.");
            
            AddBullet("I {0}consent to images of my child participating in Shepperton Slalom Canoe Club activities being used for club publicity, including on the Club’s website.", (PCF.ImageConsent)?"":"do not ");
            AddBullet("I consent that photographs taken by authorised personnel of my child at BCU or Club events may be used to promote paddlesport and confirm that my child is not subject to any court order prohibiting publication of their image.");
            AddBullet("I consent to my child travelling by any form of public transport, minibus or motor vehicle driven by a club coach or any other parent attending, to any event in which the club is participating.");
            AddBullet("I agree to be at the pick-up/drop-off point at the agreed time.");
            AddBullet("I understand that the Club or Organisers accept no responsibility for loss, damage or injury caused by or during attendance on any of the Club’s organised activities except where such loss, damage or injury can be shown to result directly from the negligence of the Club or Organisers.");
            
            if (PCF.contactConsent != "")
                AddBullet("I Consent to my child's {0} being distributed to other club members.", PCF.contactConsent);
            else
                AddBullet("I consent to my child’s name appearing on membership lists, but without contact details.");
            
            if(PCF.EmergencyConsent)
                AddBullet("I consent to the emergency name and numbers for my child being published on the club sign in sheet.");
            else
                AddBullet("I do not wish an emergency name and contact number to appear on the club sign in sheet for my child.");

        }
        private void AddBullet(string Bullet)
        {
            BulletPoints.Items.Add(Bullet);
        }
        private void AddBullet(string Bullet, object arg0)
        {
            BulletPoints.Items.Add(String.Format(Bullet, arg0));
        }
    }
}
